def STR(n, base):
    string = "0123456789ABCDEF"
    if n < base:
        return string[n]
    else:
        return STR(n//base, base) + string[n%base]
